<template>
  <div class="container">
    <div class="xq">
      <a href="javascript:;" style="display: block;height: 200px;background: url(/img/xiangqing.gif) no-repeat center;" class="xqlba">
      </a>
      <section class="zxsc2 af">
        <div class="left">
          <p class="wz">当前位置：<router-link to="/">首页</router-link> > <router-link to="/Info">行业资讯</router-link> > {{title.xq.currentInfo.keyword}}</p>
          <div class="xqtop">
            <h3>{{title.xq.currentInfo.title}}</h3>
            <div class="ctdb">
              <span class="house">来源：中海启航集团</span>
              <em>阅读量：{{title.xq.currentInfo.readnum}}</em>
              <i>时间：{{title.xq.currentInfo.createtime}}</i>
              <div  v-html="title.msg2" class="dbct">
              </div>
            </div>
            <div class="xqbt af">
              <div class="left">
                <a href="javascript:;" class="syp" @click="qh(title.xq.upInfo.id,title.xq.upInfo.title)">上一篇：{{title.xq.upInfo.title==undefined?'没有了~~':title.xq.upInfo.title}}</a><br/>
                <a href="javascript:;" class="xyp" @click="qh(title.xq.downInfo.id,title.xq.downInfo.title)">下一篇：{{title.xq.downInfo.title==undefined?'没有了~~':title.xq.downInfo.title}}</a>
              </div>
            </div>
          </div>
        </div>
        <div class="rt">
          <a href="javascript:;" class="zxgg1 zxgg"></a>
          <a href="javascript:;" class="zxgg2 zxgg"></a>
          <a href="javascript:;" class="zxgg3 zxgg"></a>
        </div>
      </section>
    </div>
    <my-ft></my-ft>
  </div>

</template>
<script>
  import axios from 'axios';
  import $ from 'jquery';
  export default {
    name: 'HelloWorld',
    data () {
      return {
        selenv:false,
        title:null,
        yqljData:null,
        pageName: 'loading',
        msg2:'',
        dlzt:'',
        swiperSlides: [1, 2, 3, 4, 5, 6],
        fuwu:1,
        title:null,
        sjsz:[],
      }
    },
    async asyncData ({ params }) {
    let nh2 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Header/headerData`);
    let nh3 = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Info/infoDetailsData`,{
      params:{
        infoid:params.id
      }});
    let nhh = nh3.data.currentInfo.content;
    let nhh1 = '' +nhh;
    function unescape(html){
      return html
        .replace(html ? /&(?!#?\w+;)/g : /&/g, '&amp;')
        .replace(/&lt;/g, "<")
        .replace(/&gt;/g, ">")
        .replace(/&quot;/g, "\"")
        .replace(/&#39;/g, "\'")
        .replace(/\/UEditOR/g, 'https://exam.zhonghaiqihang.com/UEditOR')
    }
    var nhh2= unescape(nhh1);
    let data  = {nav:nh2.data,id:params.id,xq:nh3.data,msg2:nhh2};
    return { title: data}
    },
    head () {
      return {
        title: this.title.xq.currentInfo.title+'-企业邦',
        meta: [
          { hid: 'description', name: 'description', content: this.title.xq.currentInfo.summary },
          { hid: 'keywords', name: 'keywords', content:this.title.xq.currentInfo.keyword }
        ]
      }
    },
    mounted: function () {
      let a = document.cookie;
      let cookie = '';
      if(a.indexOf('userinfoRes')!=-1){
        let b = a.split('userinfoRes=');
        let c = b[1].split(';');
        cookie = c[0];
      }
      this.dlzt = cookie;
    },
    methods:{
      tzdh:function(e){
        this.$router.push('/'+e);
      },
      qh:function(e,e2) {
        var _this = this;
        if (e2 != undefined) {
          const new1 = this.$router.push('/Details/'+e);
        }

      }
    }
  }


</script>
